package top.lwaiting.pojo;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;

/**
 * 封装 *Mapp.xml 文件，配置文件等信息
 * 存放数据库基本信息、Map<唯⼀标识，Mapper> 唯⼀标识：namespace + "." + id
 * @author YANG
 * @version V1.0
 * @date 2024/1/12 16:10
 * @see Configuration
 **/
public class Configuration {

    private DataSource dataSource;

    /**
     * key: statementId(Sql 唯一标识) = namespaceId + sqlId
     * value: 封装好的 MappedStatement 对象
     */
    Map<String, MappedStatement> mappedStatementMap = new HashMap<>();

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Map<String, MappedStatement> getMappedStatementMap() {
        return mappedStatementMap;
    }

    public void setMappedStatementMap(Map<String, MappedStatement> mappedStatementMap) {
        this.mappedStatementMap = mappedStatementMap;
    }
}
